@extends('/model/goods')
@section('title','单一品牌商品列表')
@section('content')
<div class="i_bg"> 
    <div class="content mar_20">
    	<div class="l_history">
        	<div class="his_t">
            	<span class="fl">浏览历史</span>
                <span class="fr"><a href="" id='clearhistory'>清空</a></span>
            </div>
        	<ul id='history' class='display'>
            <!-- 商品浏览历史 -->
        	</ul>
        </div>
        <div class="l_list">
        	<table border="0" style="width:100%; margin-bottom:30px; border:1px solid #eaeaea;" cellspacing="0" cellpadding="0">
              <tr valign="top">
                <td width="248"><div class="brand_img"><img src="{{$goodslist[0]['picbrand']}}" width="226" height="108" /></div></td>
                <!-- 获取所有品牌 -->
                <script type="text/javascript">
                    $.get('/allbrands',function(data)
                    {
                        var str = '';
                        // console.log(data);
                        for(var i= 0; i < data.length; i++) {
                            str += '<a href="/brandgoods?id='+data[i].id+'">'+data[i].brand+'</a>';
                        };
                        // console.log(str);
                        $("span[name=alltype]").html(str);
                    },'json');

                </script>
                <td class="td_b" style="padding:15px 40px;">
                	所有品牌<br /><span name="alltype">
                    <!-- 所有品牌 -->
                </span></td>
              </tr>
            </table>
        	<div class="list_t">
            	<span class="fl list_or">
                	<a href="#" class="now">默认</a>
                    <a href="#">
                    	<span class="fl">销量</span>                        
                        <span class="i_up">销量从低到高显示</span>
                        <span class="i_down">销量从高到低显示</span>                                                     
                    </a>
                    <a href="#">
                    	<span class="fl">价格</span>                        
                        <span class="i_up">价格从低到高显示</span>
                        <span class="i_down">价格从高到低显示</span>     
                    </a>
                    <a href="#">新品</a>
                </span>
                <span class="fr">共发现120件</span>
            </div>
            <div class="list_c">
            	
                <ul class="cate_list">
                @foreach($goodslist as $value)
                	<li>
                    	<div class="img"><a href="/product?id={{$value['id']}}"><img src="{{$value['picname']}}" width="210" height="185" /></a></div>
                        <div class="price">
                            <font>￥<span>{{$value['price']}}.00</span></font> &nbsp; {{$value['desc']}}
                        </div>
                        <div class="name"><a href="/product?id={{$value['id']}}">{{$value['goods']}}</a></div>
                        <div class="carbg">
                        	<a href="#" class="ss">收藏</a>
                            <a href="/car?id={{$value['id']}}" class="j_car">加入购物车</a>
                        </div>
                    </li>
                @endforeach 
                </ul>
    
            </div>
        </div>
    </div>
@endsection
